<?php
echo "<div id='atividade_page'>";
echo "<h2>Fotos</h2>";

if (isset($albums) && is_array($albums) && (!empty($albums))) {
	foreach ($albums as $album) {
		echo "<div class='album_row'>";
		echo "<div class='album_prev' style='float:left; left:0px;'>";
		echo "<a class='thumb link' href='".$album['Album']['link']."'>";
		if (isset($album['Image'][0])) {
			echo "<div class='left'> ".$html->image($album['Image'][0]['filename'],array('class'=>'image image_prev'))." </div>";
		} else {
			echo "<div class='left'></div>";
		}	
		echo "</a></div>";
		echo "<div class='album_description'>";
		echo '<p><h3>'.$html->link($album['Album']['titulo'],$album['Album']['link'], array('class'=>'link')).'</h3>';
		echo '<b> Data: </b>'.date_format(date_create($album['Album']['data']),'d/m/Y').'<br>';
		echo '<b> Descrição: </b>'.$album['Album']['descricao'].'<br>';
		echo '<b> Imagens Cadastradas: </b>'.count($album['Image']).'</p><br><br>';
		echo "</div>";
		echo "</div>";
	}
}
echo '</div>';
